package com.yjt.sousou.camera.preview;

import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

import androidx.annotation.Nullable;

import com.yjt.sousou.R;
import com.yjt.sousou.base.BaseActivity;

import butterknife.BindView;

/**
 * 作者：83734
 * 时间：2018/11/24
 * 描述：
 */
public class VideoActivity extends BaseActivity {
    @BindView(R.id.vv_view)
    VideoView mVideoView;
    @Override
    protected Object setContentLayout() {
        return R.layout.activity_video;
    }

    @Override
    protected void init(@Nullable Bundle savedInstanceState) {
        Uri uri = Uri.parse(getIntent().getStringExtra("videoUri"));
        mVideoView.setMediaController(new MediaController(this));
        mVideoView.setVideoURI(uri);
        mVideoView.start();
        mVideoView.requestFocus();
    }
}
